package javase1.day11.demo03;

public class Body {

    public class Heart{//成员内部类
        public void methodN(){
            System.out.println("成员内部类方法");
            System.out.println(name);
        }
    }


    private String name;
    public void methodW(){
        System.out.println("外部类方法");
        Heart heart=new Heart();
        heart.methodN();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
